package cn.wusifx.zabbix.request.builder.host;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.List;
import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/hostprototype/create
 */
public class HostPrototypeCreateRequestBuilder  extends CreateRequestBuilder {
    private String host;
    private String ruleId;
    private List<Map<String,Object>> groupLinks;
    public HostPrototypeCreateRequestBuilder(String auth) {
        super("hostprototype.create", auth);
    }

    public HostPrototypeCreateRequestBuilder(Long id, String auth) {
        super("hostprototype.create", id, auth);
    }

    public String getHost() {
        return host;
    }

    public HostPrototypeCreateRequestBuilder setHost(String host) {
        this.host = host;
        return this;
    }

    public String getRuleId() {
        return ruleId;
    }

    public HostPrototypeCreateRequestBuilder setRuleId(String ruleId) {
        this.ruleId = ruleId;
        return this;
    }

    public List<Map<String, Object>> getGroupLinks() {
        return groupLinks;
    }

    public HostPrototypeCreateRequestBuilder setGroupLinks(List<Map<String, Object>> groupLinks) {
        this.groupLinks = groupLinks;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("host",host);
        baseRequest.getParams().put("ruleid",ruleId);
        baseRequest.getParams().put("groupLinks",groupLinks);
        return baseRequest;
    }
}
